package it.polimi.traveldream.web.beans;

import java.util.List;

import it.polimi.traveldream.ejb.management.AerMgr;
import it.polimi.traveldream.ejb.management.AeroportoDTO;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


@ManagedBean(name = "aerBean")
@RequestScoped
public class BeanAeroporto {
	
	@EJB
	private AerMgr aerMgr;
	
	private AeroportoDTO aeroporto;
	
	private AeroportoDTO selected;
	
	
	
	public AeroportoDTO getSelected() {
		return selected;
	}

	public void setSelected(AeroportoDTO selected) {
		this.selected = selected;
	}

	public List<AeroportoDTO> getAeroporti() {
		return aerMgr.getListaAeroporti();
	}
	
	public AeroportoDTO getAeroporto() {
		return aeroporto;
	}
	
	public List<AeroportoDTO> getAeroportiNome(String codIata) {
		return aerMgr.getAeroportoNome(codIata);
	}
	
	
	

}
